package com.zb.config.mybatisplus;

import com.baomidou.mybatisplus.core.injector.AbstractMethod;
import com.baomidou.mybatisplus.core.injector.DefaultSqlInjector;
import com.baomidou.mybatisplus.extension.injector.methods.additional.InsertBatchSomeColumn;

import java.util.ArrayList;
import java.util.List;

public class MysqlInjector extends DefaultSqlInjector {
    @Override
    public List<AbstractMethod> getMethodList(Class<?> mapperClass) {
        //首先将父类中已经实现的所有方法加载进来
        List<AbstractMethod> methodList = super.getMethodList(mapperClass);
        List<AbstractMethod> list = new ArrayList<>(methodList);
        list.add(new InsertBatchSomeColumn());
        return list;
    }
}
